<!DOCTYPE>
<html>
  <head>
    <meta charset="utf-8">
    <link type="text/css" href="Style.css" rel="stylesheet"></link>
	<style>
	</style>
  	<title>登录</title>
 <script src="js/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="js/inputnull.js"></script>
	<script>
	function clearBooksTable() {
		var table = document.getElementById("myOrd");
		while (table.rows.length > 1)
		table.deleteRow(1);
	}

	function show(){
		$.get("../findBooksServlet",function(books){
			 	clearBooksTable();
				var book=JSON.parse(books);
				var table=document.getElementById("myOrd");
				for(var index in book){
					var newRow = table.insertRow(table.rows.length);
					var col1 = newRow.insertCell(0);
					var col2 = newRow.insertCell(1);
					var col3 = newRow.insertCell(2);
					var col4 = newRow.insertCell(3);
					col1.innerHTML = book[index].name; 
					col2.innerHTML = book[index].author;
					col3.innerHTML = book[index].publisher;
					col4.innerHTML = book[index].price;
				}
		})
	}
	
	</script>
  </head>
  <body>
	<ul id="nav">        <!--导航条-->
	  <li><a href="myOrder.html">我的订单 </a></li>
	  <li><a href="recycle.html">申请回收 </a></li>
	  <li><a href="myInfo.html">个人信息 </a></li>
	  <li><a href="">常见问题 </a></li>
	  <li><a href="login.html">退出登录 </a></li>
	</ul>
	<form id="searchBook" onSubmit=" return navigationbeforeSubmit(this) ">
	    <text id="s_b_txt1">二手书回收平台</text>
	    <text id="s_b_txt2">二手书定价查询平台</text>
	    <input id="s_b_input1" name="bookNameAuthor" type="text" placeholder="图书名称、作者">
		<input id="s_b_input2" name="search" type="submit" value="搜索">                   <!-- 搜索功能 -->
		
		<div id="divOfBookInfo">
	    <h1>查询结果</h1>
          <table class="myOrd" id="myOrd">                     <!-- 显示配送信息 -->       
            <tbody>
		      <tr>
			    <th>图书编号</th><th>图书名</th><th>作者</th><th>出版社</th><th>价格</th>
		      </tr>
			  <tr>
			    <td>       </td><td>       </td><td>       </td><td>       </td><td>       </td>          <!-- 将回收单信息放到该表格中 -->  <!--暂时没想到表格里设置什么以跳转到定价界面-->
			  </tr>
		    </tbody>
          </table>		
	    </div>
	</form>